package karma.main;

import net.minecraft.client.Minecraft;
import net.minecraft.src.*;

public class ItemELHelm extends ItemArmor
{
    public ItemELHelm(int i, EnumArmorMaterial enumarmormaterial, int j, int k)
    {
        super(i, enumarmormaterial, j, k);
    }

    public static void checkIfWorn(Minecraft minecraft)
    {
        if (minecraft.thePlayer.inventory.armorInventory[3] != null && minecraft.thePlayer.inventory.armorInventory[3].getItem() == mod_KarmaCraft.ELHelm)
        {
            doSpecial(minecraft);
        }
    }

    public static void doSpecial(Minecraft minecraft)
    {
        if (minecraft.thePlayer.getAir() <= 1)
        {
        	minecraft.thePlayer.setAir(286);
        	ItemStack armor = minecraft.thePlayer.inventory.armorInventory[3];
        	armor.damageItem(1, minecraft.thePlayer);
        }
    }

    /**
     * Return an item rarity from EnumRarity
     */
    public EnumRarity getRarity(ItemStack itemstack)
    {
        return mod_KarmaCraft.ENCHANTED;
    }
}
